package com.gimi.cloud.bbp.manage.consumer.feign;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.gimi.cloud.bbp.common.utils.reqhead.Response;
import com.gimi.cloud.bbp.dto.prod.EcProdCategoryDTO;

import feign.Headers;

/**
* 品类相关Fegin
* @author lixj
* @Description
* @create 2017-12-18
* @version 1.0
**/
@FeignClient(name = "bbp-manage-service")
public interface EcProdCategoryFeignService {

    /***商品品类操作开始
     * @param prodCategoryDTO***/
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "category/list", method = RequestMethod.POST)
    Response getCategoryList(EcProdCategoryDTO prodCategoryDTO);
    /*
     * 删除品类
     * @param prodCategoryDTO 待删除的品类
     * @return
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "category/delete", method = RequestMethod.POST)
    Response categoryDelete(EcProdCategoryDTO prodCategoryDTO);

    /**
     * 获取分页列表
     * @param prodCategoryDTO 查询参数
     * @return 查询结果
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "category/pageList", method = RequestMethod.POST)
    Response getCategoryPageList(EcProdCategoryDTO prodCategoryDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "category/gotoEditProdCategory", method = RequestMethod.POST)
    Response gotoEditProdCategory(EcProdCategoryDTO prodCategoryDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "category/searchCategoryListByGrade", method = RequestMethod.POST)
    Response searchCategoryListByGrade(EcProdCategoryDTO prodCategoryDTO);

    @Headers({"Content-Type: mutipart/form-data","Accept: application/json"})
    @RequestMapping(value = "category/iconUpload", method = RequestMethod.POST)
    Response iconUpload(MultiValueMap file);

    /**
     * 编辑或保存品类
     * @param ecProdCategory
     * @throws Exception
     */
    @Headers({"Content-Type: mutipart/form-data","Accept: application/json"})
    @RequestMapping(value = "category/saveOrUpdate", method = RequestMethod.POST)
    Response saveOrUpdate(EcProdCategoryDTO ecProdCategory) throws Exception;
    /***商品品类操作结束***/


}
